﻿<Window x:Class="Resn.WhuPub.WPFClientUI.CreateCorporateWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     WindowStartupLocation="CenterScreen" Style="{StaticResource WindowStyle}"
        Loaded="Window_Loaded" MouseDown="Window_OnMouseDown" >
        <Grid Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <Grid Background="{StaticResource TitleGridColor}">
                        <TextBlock Text="新建学校" Style="{DynamicResource BigTextBlockStyle}" />
                </Grid>
                

                <Grid Grid.Row="1" Background="{StaticResource ContentGridColor}">
                        <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="学校信息" 
                                   HorizontalAlignment="Left" />

                        <TextBlock Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Text="名称"
                                    VerticalAlignment="Center" />
                        <TextBox Grid.Column="1" Grid.Row="1" Name="CorporateNameTextBox" 
                                 Text="{Binding Name}"/>

                        <TextBlock Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" Text="层次"
                                    />
                        <ComboBox Grid.Column="1" Grid.Row="2" Name="CorporateLevelComboBox"
                                  ItemsSource="{Binding CorporateLevels}"
                                  SelectedValue="{Binding CorporateLevel}"/>
                        
                        <TextBlock Grid.Column="0" Grid.Row="3" Text="主校区信息" 
                                   HorizontalAlignment="Center"/>
                        <TextBlock Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right" Text="省份"
                                   VerticalAlignment="Center"  />
                        <ComboBox Grid.Column="1" Grid.Row="4" HorizontalAlignment="Stretch"
                                  Name="BranchProvinceComboBox" VerticalAlignment="Center"
                                  ItemsSource="{Binding Provinces}"
                                  DisplayMemberPath="Name"
                                  SelectedValue="{Binding Province, UpdateSourceTrigger=PropertyChanged}"/>
                        
                        <TextBlock Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right" Text="城市"
                                   VerticalAlignment="Center"  />
                        <ComboBox Grid.Column="1" Grid.Row="5" HorizontalAlignment="Stretch"
                                  Name="BranchCityComboBox" VerticalAlignment="Center"
                                  ItemsSource="{Binding Citys}"
                                  DisplayMemberPath="Name"
                                  SelectedValue="{Binding City, UpdateSourceTrigger=PropertyChanged}" />
                        
                        <TextBlock Grid.Column="0" Grid.Row="6" HorizontalAlignment="Right" Text="地址"
                                   VerticalAlignment="Center"  />
                        <TextBox Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
                                 Name="BranchAddressTextBox" VerticalAlignment="Center"
                                  Text="{Binding Address}" />
                        
                        <TextBlock Grid.Column="0" Grid.Row="7" HorizontalAlignment="Right" Text="邮编"
                                   VerticalAlignment="Center"  />
                        <TextBox Grid.Column="1" Grid.Row="7" HorizontalAlignment="Stretch"
                                 Name="BranchPostcodeTextBox" VerticalAlignment="Center"
                                  Text="{Binding Postcode}" />
                        
                        <TextBlock Grid.Column="0" Grid.Row="8" HorizontalAlignment="Right"
                                   Text="网址" VerticalAlignment="Center"  />
                        <TextBox Grid.Column="1" Grid.Row="8" HorizontalAlignment="Stretch"
                                 Name="BranchWebsiteTextBox" VerticalAlignment="Center"
                                  Text="{Binding Website}" />
                </Grid>
                <Grid Grid.Row="2" Background="{StaticResource ContentGridColor}">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="1" Style="{DynamicResource WindowCancelButtonStyle}"/>
                        <Button Grid.Column="2" Style="{DynamicResource WindowAcceptButtonStyle}" Click="AcceptButton_Click" />

                </Grid>
        </Grid>
</Window>